package aufgabe6;

public class IterationsPruefung
{
  public static int zaehleIterationen(double cx, double cy)
  {
    double xn = 0;
    double yn = 0;
    for(int count = 1; count<=200; count++)
    {
      double tempX = xn;
      xn = xn*xn - yn*yn + cx;
      yn = 2*tempX*yn + cy;
      System.out.println("xn = "+xn);
      System.out.println("yn = "+yn);
      System.out.println("Count: "+count);
      System.out.println();
      if(xn*xn + yn*yn > 4)
        return count;
    }
    return 200;
  }
  
  public static void main(String[] args)
  {
    zaehleIterationen(0.1, 1);
  }
}
